<template>
    <div>
         <van-sticky>
         <div class="head">
        <TopBar class="t" :title="'发布动态'"  :url="'/dynIndex'"></TopBar>
        <span class="send" @click="sendHandler">发布</span>
       </div>
       </van-sticky>
       <textarea cols="45" rows="8" placeholder="分享下你的健身体验~"></textarea>
        <van-uploader class="imgup" v-model="fileList" multiple />
        <div class="dyn">未公开地址</div>
        <div class="dyn">
            公开动态 
        <van-switch v-model="checked" active-color="#695ded"  inactive-color="#dcdee0" size="16px" />
        </div>
        <van-overlay class="bkblock" ref="bkblock" :show="blockShow" @click="blockShow = false">
            <div class="noticblock">
                <img src="../../assets/img/find/succeed.jpg" alt="">
            </div>
        </van-overlay>
    </div>
</template>

<script>
import Vue from 'vue';
 import { Sticky,Uploader ,Switch,Overlay  } from 'vant';
 Vue.use(Sticky)
Vue.use(Uploader)
Vue.use(Switch)
Vue.use(Overlay);
import TopBar from "../../component/TopBar";
export default{
      name: "newDyn",
        components:{
            TopBar
        },
         data() {
            return {
            checked: true,
            blockShow: false,
            fileList: [
            
            ],
            };
        },
        methods:{
            sendHandler(){
                this.blockShow = true
                let block=this.$refs.bkblock
                block.style.display='flex'
               setTimeout(function(){
                    block.style.display='none'
               },1000)
            }
        },
        
}
</script>

<style lang='stylus' scoped>
@import "../../assets/stylus/border.styl"

    .head
        position relative
        padding-left: .16rem
        margin-top: .2rem 
        font-size .16rem  
        border_1px(0 0 1px 0)        
        .send
            position absolute
            font-weight 600
            right .2rem
            top .014rem
            color #000
            font-size .14rem
    textarea
        border none 
        margin .1rem .14rem
    ::-webkit-input-placeholder 
        color #d2d2d2
    .imgup
       margin 0 .14rem 
    .dyn
        color #222f36
        font-size .12rem
        margin .15rem .14rem
        display flex 
        justify-content space-between
    .bkblock
        height 100%
        display flex
        justify-content center 
        align-items center
        
    

</style>